import React from 'react'
import {inject, observer} from 'mobx-react';
import {Popover,Tools, Echarts,WingBlank,Carousel} from 'weaver-mobile';
import {Route, withRouter } from 'react-router-dom';
import QueueAnim from 'rc-queue-anim';
import {getEChartsOption} from '../../public/chart'

const getLabel = Tools.getLabel;
const tweenFunctions = require('tween-functions');

@withRouter
@inject ('reportStore')
@observer
class Report extends React.Component {
    constructor(props){
        super(props);
       
    }

    static defaultProps = {
        prefixCls:"fna-report"
    }    

    componentDidMount() {
        const {reportStore} = this.props;
        const {initData,data} = reportStore;
        initData();
    }

    render() {
        const {reportStore} = this.props;
        const {dataSoure} = reportStore;

        let dataCom = null;
        if (dataSoure) {
            console.log('32232',dataSoure)
          dataCom = (
            <div className="data-ul">
              <div style={{ width: '100%', height: '200px' }}>
                {/* <Echarts option={getEChartsOption(data)} /> */}
                <Echarts option={dataSoure} />
              </div>
            </div>
          );
        }

        return (
            <div>
                <div>
                    {dataCom}
                </div>





            </div>
        )
    }
}

export default Report;